package com.spic.business.home.controller;

import com.spic.business.home.domain.ShortcutFunction;
import com.spic.business.home.service.ShortcutFunctionService;
import com.spic.common.core.web.controller.BaseController;
import com.spic.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 290512
 * @create 2022-01-13 19:02
 */
@RestController
@RequestMapping("/shortcutFunction")
public class ShortcutFunctionController extends BaseController
{
    @Autowired
    private ShortcutFunctionService shortcutFunctionService;

    @GetMapping("/list")
    public AjaxResult getShortcutFunctionList(){
        return AjaxResult.success(shortcutFunctionService.getShortcutFunctionList());
    }

    @PostMapping
    public AjaxResult add(@RequestBody ShortcutFunction shortcutFunction)
    {
        return shortcutFunctionService.insertShortcutFunction(shortcutFunction);
    }

}
